package QC.MessageBox.beans;

import QC.MessageBox.annotation.APPTable;

/**
 * Created by Andaren on 2017/5/23.
 * Used for: 记录用户互动失效、可发送消息限制等
 */
@APPTable(table = "t_user_limit")
public class UserLimit {

    @APPTable(column = "id", isId = true)
    private Long id;                // 用户限制表

    @APPTable(column = "openid")
    private String openId;          // 微信用户唯一标识

    @APPTable(column = "developerid")
    private String developerId;     // 公众号唯一标识

    @APPTable(column = "last_send_time")
    private Long laseSendTimestamp; // 最近一次互动的时间戳

    @APPTable(column = "limit_text")
    private Integer textLimit;      // 文本信息剩余发送次数

    @APPTable(column = "limit_pic")
    private Integer picLimit;       // 图片信息剩余发送次数

    @APPTable(column = "limit_pic_text")
    private Integer picTextLimt;    // 图文信息剩余发送次数

    @APPTable(column = "lately_msgid")
    private Long latelyMsgId;       // 最近一次聊天记录的ID

    public Long getId() {
        return id;
    }

    public UserLimit setId(Long id) {
        this.id = id;
        return this;
    }

    public String getOpenId() {
        return openId;
    }

    public UserLimit setOpenId(String openId) {
        this.openId = openId;
        return this;
    }

    public String getDeveloperId() {
        return developerId;
    }

    public UserLimit setDeveloperId(String developerId) {
        this.developerId = developerId;
        return this;
    }

    public Long getLaseSendTimestamp() {
        return laseSendTimestamp;
    }

    public UserLimit setLaseSendTimestamp(Long laseSendTimestamp) {
        this.laseSendTimestamp = laseSendTimestamp;
        return this;
    }

    public Integer getTextLimit() {
        return textLimit;
    }

    public UserLimit setTextLimit(Integer textLimit) {
        this.textLimit = textLimit;
        return this;
    }

    public Integer getPicLimit() {
        return picLimit;
    }

    public UserLimit setPicLimit(Integer picLimit) {
        this.picLimit = picLimit;
        return this;
    }

    public Integer getPicTextLimt() {
        return picTextLimt;
    }

    public UserLimit setPicTextLimt(Integer picTextLimt) {
        this.picTextLimt = picTextLimt;
        return this;
    }

    public Long getLatelyMsgId() {
        return latelyMsgId;
    }

    public UserLimit setLatelyMsgId(Long latelyMsgId) {
        this.latelyMsgId = latelyMsgId;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("UserLimit{");
        sb.append("id=").append(id);
        sb.append(", openId='").append(openId).append('\'');
        sb.append(", developerId='").append(developerId).append('\'');
        sb.append(", laseSendTimestamp=").append(laseSendTimestamp);
        sb.append(", textLimit=").append(textLimit);
        sb.append(", picLimit=").append(picLimit);
        sb.append(", picTextLimt=").append(picTextLimt);
        sb.append(", latelyMsgId=").append(latelyMsgId);
        sb.append('}');
        return sb.toString();
    }
}
